{include file="pub_header.htm"}
<div class="out_table">
<table width="100%" cellpadding="6" cellspacing="6" border="0" align="center" class="frame_table">
  <tr>
    <td width="20%" align="left" valign="top" bgcolor="#EEEEEE" class="main_border_inside">
      {include file="pub_submenu.htm"}
    </td>
    <td width="80%" align="center" valign="top" bgcolor="#FFFFFF">

      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=set_select" target="_self" class="current_place">系统选项设置</a>
          </td>
          <td align="right" nowrap>
            &nbsp;
          </td>
        </tr>
      </table>
      </div>

      {if $get.sort|in_array_key:$select_sort != "1" && $select_sort|@is_array && $select_sort|@count > 0}
      <div class="space"></div>
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td>类别</td>
        </tr>
        <tr align="left">
          <td>
          {foreach name=select_sort from=$select_sort key=key item=item}
            <a href="{$control_admin}?act=set_select&sort={$key}" target="_self">{$item}</a>
            {if $smarty.foreach.select_sort.last != true}│{/if}
          {/foreach}
          </td>
        </tr>
      </table>
      </div>
      {/if}
      {if $get.sort|in_array_key:$select_sort == "1"}
      <div class="space"></div>
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="6" height="25"><span class="float_left">{$select_sort[$get.sort]}</span><span class="float_right"><img src="{$dir_images_admin}/icon_modify.gif" title="Warning" alt="Warning" align="absmiddle" /> 双击修改内容</span></td>
        </tr>
        <tr class="block_title">
          <td width="10%" height="25">ID</td>
          <td width="25%" nowrap>名称</td>
          <td width="30%" nowrap>值</td>
          <td width="15%" nowrap>排序</td>
          <td width="10%" nowrap>默认</td>
          <td width="10%" nowrap>操作</td>
        </tr>
        {foreach name=select_list from=$select_list item=item}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
          <td height="25">
            {$item.id}
          </td>
          <td title="双击修改内容" ondblclick="xajax_set_value_onfocus('name', '{$item.id}', $('#name_{$item.id}_value').val(), 'text', 255, 'width:170px;text-align:center;');">
            <table width="100%" height="25" cellspacing="0" cellpadding="0" border="0" class="content_wrap"><tr><td class="dbclick_modify" align="center"><div id="name_{$item.id}" name="name_{$item.id}">{$item.name|str_entag:'space'}</div></td></tr></table>
            <input type="hidden" id="name_{$item.id}_value" name="name_{$item.id}_value" value="{$item.name}">
          </td>
          <td title="双击修改内容" ondblclick="xajax_set_value_onfocus('value', '{$item.id}', $('#value_{$item.id}_value').val(), 'text', 255, 'width:200px;text-align:center;');">
            <table width="100%" height="25" cellspacing="0" cellpadding="0" border="0" class="content_wrap"><tr><td class="dbclick_modify" align="center"><div id="value_{$item.id}" name="value_{$item.id}">{$item.value}</div></td></tr></table>
            <input type="hidden" id="value_{$item.id}_value" name="value_{$item.id}_value" value="{$item.value}">
          </td>
          <td title="双击修改内容" ondblclick="xajax_set_value_onfocus('rank', '{$item.id}', $('#rank_{$item.id}_value').val(), 'text', 11, 'width:50px;text-align:center;');">
            <table width="100%" height="25" cellspacing="0" cellpadding="0" border="0" class="content_wrap"><tr><td class="dbclick_modify" align="center"><div id="rank_{$item.id}" name="rank_{$item.id}">{$item.rank}</div></td></tr></table>
            <input type="hidden" id="rank_{$item.id}_value" name="rank_{$item.id}_value" value="{$item.rank}">
          </td>
          <td title="双击修改内容" ondblclick="xajax_set_value_onfocus('if_default', '{$item.id}', $('#if_default_{$item.id}_value').val(), 'checkbox', 255, 'text-align:center;');">
            <table width="100%" height="25" cellspacing="0" cellpadding="0" border="0" class="content_wrap"><tr><td class="dbclick_modify" align="center"><div id="if_default_{$item.id}" name="if_default_{$item.id}">{if $item.if_default == "1"}&radic;{/if}</div></td></tr></table>
            <input type="hidden" id="if_default_{$item.id}_value" name="if_default_{$item.id}_value" value="{$item.if_default}">
          </td>
          <td nowrap>
            <a href="{$control_admin}?act=set_select&ope=del&sort={$get.sort}&id={$item.id}" target="_self" onClick="return confirm('真的要删除记录?')"><img src="{$dir_images_admin}/icon_delete.gif" border="0" alt="删" title="删除记录"></a>
          </td>
        </tr>
        {/foreach}
      </table>
      <div class="space"></div>
      <form action="{$control_admin}?act=set_select&ope=add&sort={$get.sort}" method="post" name="manage" id="manage" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr class="block_footer" align="center">
          <td width="35%" align="right" height="25"><input type="text" id="name" name="name" size="30" maxlength="255" value="" class="input" style="width:170px;text-align:center;" /></td>
          <td width="30%" nowrap><input type="text" id="value" name="value" size="35" maxlength="255" value="" class="input" style="width:200px;text-align:center;" /></td>
          <td width="15%" nowrap><input type="text" id="rank" name="rank" size="6" maxlength="255" value="" class="input" style="width:50px;text-align:center;" /></td>
          <td width="10%" nowrap><input type="checkbox" id="if_default" name="if_default" value="1" class="checkbox" /></td>
          <td width="10%" nowrap><input type="submit" name="submit" value="添加" class="submit"></td>
        </tr>
      </table>
      </form>
      </div>
      {/if}

    </td>
  </tr>
</table>
{include file="pub_footer.htm"}